using DAO;
using Easislides.Properties;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmImportAccessHelper : Form
	{
		private bool FormInit = true;
		private string MessRecords = "";
		private IContainer components = null;
		private ComboBox TablesList;
		private Label label1;
		private Label label2;
		private ListView TableExtracts;
		private Label label3;
		private GroupBox groupBox2;
		private Panel panelVerses;
		private ListView AssignedLyrics;
		private ColumnHeader columnHeader1;
		private Panel panel2;
		private Label label16;
		private Panel panelOrderList;
		private ListView AssignedLyricsMergeOrderList;
		private ColumnHeader columnHeader6;
		private Panel panel4;
		private Label label17;
		private Panel panelSeqSet;
		private ToolStrip toolStripColumnAdd;
		private ToolStripButton Column_Add;
		private Panel panelSeqUpDown;
		private ToolStrip toolStripSeqUpDown;
		private ToolStripButton OrderList_Up;
		private ToolStripButton OrderList_Down;
		private ToolStripSeparator toolStripSeparator5;
		private ToolStripButton OrderList_Delete;
		private ComboBox AssignedTitle;
		private Label label4;
		private GroupBox groupBox1;
		private Label label6;
		private ComboBox AssignedTitle2;
		private Label label5;
		private Label label14;
		private ComboBox AssignedAdmin2;
		private Label label15;
		private ComboBox AssignedAdmin1;
		private Label label12;
		private ComboBox AssignedTiming;
		private Label label13;
		private ComboBox AssignedWriter;
		private Label label10;
		private ComboBox AssignedKey;
		private Label label11;
		private ComboBox AssignedCopyright;
		private Label label8;
		private ComboBox AssignedUserReference;
		private Label label9;
		private ComboBox AssignedSongNumber;
		private Label label7;
		private ComboBox AssignedBookReference;
		private Button BtnCancel;
		private Button BtnOK;
		public FrmImportAccessHelper()
		{
			this.InitializeComponent();
		}
		private void FrmImportAccessHelper_Load(object sender, EventArgs e)
		{
			this.Text = "Access Helper: " + gf.Import_AccessFileName;
			gf.Import_TableName = "";
			gf.Import_SongTitleColumnName = "";
			gf.Import_SongTitle2ColumnName = "";
			gf.Import_SongNumberColumnName = "";
			gf.Import_BookReferenceColumnName = "";
			gf.Import_UserReferenceColumnName = "";
			gf.Import_SongLyricsColumnName = "";
			gf.Import_SongWriterInfoColumnName = "";
			gf.Import_SongCopyrightColumnName = "";
			gf.Import_SongKeyColumnName = "";
			gf.Import_SongTimingColumnName = "";
			gf.Import_Admin1ColumnName = "";
			gf.Import_Admin2ColumnName = "";
			this.ClearColumns();
			this.LoadTables();
			this.FormInit = false;
			if (this.TablesList.Items.Count > 0)
			{
				this.TablesList.SelectedIndex = 0;
			}
		}
		private bool LoadTables()
		{
			Database daoDb = gf.GetDaoDb(gf.ConnectStringDef + gf.Import_AccessFileName);
			this.TablesList.Items.Clear();
			bool result;
			try
			{
				foreach (TableDef tableDef in daoDb.TableDefs)
				{
					if (gf.Left(tableDef.Name, 4).ToLower() != "msys")
					{
						this.TablesList.Items.Add(tableDef.Name);
					}
				}
			}
			catch
			{
				MessageBox.Show("There was an error reading the Access Database File - please make sure its a proper Access Database File filled with data");
				result = false;
				return result;
			}
			if (this.TablesList.Items.Count > 0)
			{
				result = true;
			}
			else
			{
				MessageBox.Show("Sorry - the Access Database File does not contain any tables. Please quit out of this Helper.");
				result = false;
			}
			return result;
		}
		public bool TableNameExists(Database db, string TableName)
		{
			bool result;
			try
			{
				TableDef tableDef = db.TableDefs[TableName];
				result = true;
			}
			catch
			{
				result = false;
			}
			return result;
		}
		private void LoadColumns()
		{
			string text = this.TablesList.Text;
			if (text == "")
			{
				MessageBox.Show("Please select a Database Table under Step 1.");
			}
			else
			{
				Database daoDb = gf.GetDaoDb(gf.ConnectStringDef + gf.Import_AccessFileName);
				if (!this.TableNameExists(daoDb, text))
				{
					MessageBox.Show("Error Encountered - Cannot find the table " + text + " in the Access Database");
				}
				else
				{
					this.ClearColumns();
					this.AssignedTitle.Items.Add("");
					foreach (Field field in daoDb.TableDefs[text].Fields)
					{
						this.AssignedTitle.Items.Add(field.Name);
					}
					if (daoDb != null)
					{
						daoDb.Close();
					}
					if (this.AssignedTitle.Items.Count != 0)
					{
						for (int i = 0; i <= this.AssignedTitle.Items.Count - 1; i++)
						{
							string text2 = this.AssignedTitle.Items[i].ToString();
							this.AssignedLyrics.Items.Add(text2);
							this.AssignedTitle2.Items.Add(text2);
							this.AssignedSongNumber.Items.Add(text2);
							this.AssignedBookReference.Items.Add(text2);
							this.AssignedUserReference.Items.Add(text2);
							this.AssignedCopyright.Items.Add(text2);
							this.AssignedWriter.Items.Add(text2);
							this.AssignedKey.Items.Add(text2);
							this.AssignedTiming.Items.Add(text2);
							this.AssignedAdmin1.Items.Add(text2);
							this.AssignedAdmin2.Items.Add(text2);
						}
						this.AssignedTitle.Items.RemoveAt(0);
						this.AssignedLyrics.Items.RemoveAt(0);
					}
				}
			}
		}
		private void ClearColumns()
		{
			this.AssignedTitle.Items.Clear();
			this.AssignedLyrics.Items.Clear();
			this.AssignedTitle2.Items.Clear();
			this.AssignedSongNumber.Items.Clear();
			this.AssignedBookReference.Items.Clear();
			this.AssignedUserReference.Items.Clear();
			this.AssignedCopyright.Items.Clear();
			this.AssignedWriter.Items.Clear();
			this.AssignedKey.Items.Clear();
			this.AssignedTiming.Items.Clear();
			this.AssignedAdmin1.Items.Clear();
			this.AssignedAdmin2.Items.Clear();
		}
		private bool LoadExtracts()
		{
			bool result;
			if (this.AssignedTitle.Items.Count == 0 | this.TablesList.SelectedIndex < 0)
			{
				result = false;
			}
			else
			{
				this.TableExtracts.Clear();
				for (int i = 0; i <= this.AssignedTitle.Items.Count - 1; i++)
				{
					this.TableExtracts.Columns.Add(this.AssignedTitle.Items[i].ToString(), 60, HorizontalAlignment.Left);
				}
				for (int i = 0; i <= this.AssignedTitle.Items.Count - 1; i++)
				{
				}
				ListViewItem listViewItem = new ListViewItem();
				this.Cursor = Cursors.WaitCursor;
				string fullSearchString = "select * from [" + this.TablesList.Text + "]";
				Recordset recordSet = gf.GetRecordSet(gf.ConnectStringDef + gf.Import_AccessFileName, fullSearchString);
				int num = 0;
				if (recordSet != null && !recordSet.EOF)
				{
					recordSet.MoveFirst();
					int num2 = 0;
					while (!recordSet.EOF)
					{
						num2++;
						recordSet.MoveNext();
					}
					recordSet.MoveFirst();
					while (!recordSet.EOF & num < 10000)
					{
						listViewItem = this.TableExtracts.Items.Add(gf.ObjToString(recordSet.Fields[this.AssignedTitle.Items[0]].Value));
						for (int i = 1; i <= this.AssignedTitle.Items.Count - 1; i++)
						{
							listViewItem.SubItems.Add(Convert.ToString(gf.ObjToString(recordSet.Fields[this.AssignedTitle.Items[i]].Value)));
						}
						num++;
						recordSet.MoveNext();
					}
					this.label2.Text = "Records Found in selected table: " + ((num < num2) ? string.Concat(new string[]
					{
						"(Displaying ",
						num.ToString(),
						"/",
						num2.ToString(),
						" records)"
					}) : ("(Displaying all " + num2.ToString() + " records)"));
				}
				if (recordSet != null)
				{
					recordSet.Close();
				}
				this.Cursor = Cursors.Default;
				result = true;
			}
			return result;
		}
		private void TablesList_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (!this.FormInit)
			{
				this.TablesListIndexChanged();
			}
		}
		private void TablesListIndexChanged()
		{
			if (!(this.TablesList.Items.Count == 0 | this.TablesList.SelectedIndex < 0))
			{
				this.LoadColumns();
				this.LoadExtracts();
			}
		}
		private bool ValidateColumns()
		{
			bool result;
			if (this.AssignedTitle.Text == "")
			{
				MessageBox.Show("Please assign a column to the Title");
				result = false;
			}
			else
			{
				if (this.AssignedLyricsMergeOrderList.Items.Count == 0)
				{
					MessageBox.Show("'Lyrics Merge List' must have at least one column");
					result = false;
				}
				else
				{
					result = true;
				}
			}
			return result;
		}
		private void Column_MouseUp(object sender, MouseEventArgs e)
		{
			ToolStripButton toolStripButton = (ToolStripButton)sender;
			string name = toolStripButton.Name;
			if (name == "Column_Add")
			{
				this.AddBtn_Click();
			}
		}
		private void AddBtn_Click()
		{
			ListViewItem listViewItem = new ListViewItem();
			for (int i = 0; i <= this.AssignedLyrics.Items.Count - 1; i++)
			{
				if (this.AssignedLyrics.Items[i].Selected)
				{
					listViewItem = this.AssignedLyricsMergeOrderList.Items.Add(this.AssignedLyrics.Items[i].Text);
				}
			}
		}
		private void OrderList_MouseUp(object sender, MouseEventArgs e)
		{
			ToolStripButton toolStripButton = (ToolStripButton)sender;
			string name = toolStripButton.Name;
			if (name == "OrderList_Up")
			{
				this.MoveUPBtn_Click();
			}
			else
			{
				if (name == "OrderList_Down")
				{
					this.MoveDownBtn_Click();
				}
				else
				{
					if (name == "OrderList_Delete")
					{
						this.DelBtn_Click();
					}
				}
			}
		}
		private void MoveUPBtn_Click()
		{
			int count = this.AssignedLyricsMergeOrderList.Items.Count;
			if (count >= 1)
			{
				int num = 0;
				for (int i = 0; i <= count - 1; i++)
				{
					if (this.AssignedLyricsMergeOrderList.Items[i].Selected)
					{
						if (num < 1)
						{
							num = i;
						}
						else
						{
							i = count;
							num = 0;
						}
					}
				}
				if (num >= 1)
				{
					string text = this.AssignedLyricsMergeOrderList.Items[num].Text;
					this.AssignedLyricsMergeOrderList.Items[num].Text = this.AssignedLyricsMergeOrderList.Items[num - 1].Text;
					this.AssignedLyricsMergeOrderList.Items[num - 1].Text = text;
					this.AssignedLyricsMergeOrderList.Items[num].Selected = false;
					this.AssignedLyricsMergeOrderList.Items[num - 1].Selected = true;
				}
			}
		}
		private void MoveDownBtn_Click()
		{
			int count = this.AssignedLyricsMergeOrderList.Items.Count;
			if (count > 1)
			{
				int num = 0;
				for (int i = 0; i <= count - 1; i++)
				{
					if (this.AssignedLyricsMergeOrderList.Items[i].Selected)
					{
						if (num < 1)
						{
							num = i;
						}
						else
						{
							i = count;
							num = -1;
						}
					}
				}
				if (!(num < 0 | num == count - 1))
				{
					string text = this.AssignedLyricsMergeOrderList.Items[num].Text;
					this.AssignedLyricsMergeOrderList.Items[num].Text = this.AssignedLyricsMergeOrderList.Items[num + 1].Text;
					this.AssignedLyricsMergeOrderList.Items[num + 1].Text = text;
					this.AssignedLyricsMergeOrderList.Items[num].Selected = false;
					this.AssignedLyricsMergeOrderList.Items[num + 1].Selected = true;
				}
			}
		}
		private void DelBtn_Click()
		{
			if (this.AssignedLyricsMergeOrderList.Items.Count != 0)
			{
				int num = 0;
				for (int i = this.AssignedLyricsMergeOrderList.Items.Count - 1; i >= 0; i--)
				{
					if (this.AssignedLyricsMergeOrderList.Items[i].Selected)
					{
						this.AssignedLyricsMergeOrderList.Items[i].Remove();
						num = i;
					}
				}
				if (num > 0)
				{
					num--;
				}
				if (this.AssignedLyricsMergeOrderList.Items.Count > 0)
				{
					this.AssignedLyricsMergeOrderList.Items[num].Selected = true;
				}
			}
		}
		private void AssignedLyrics_DoubleClick(object sender, EventArgs e)
		{
			if (this.AssignedLyrics.SelectedItems.Count > 0)
			{
				this.AddBtn_Click();
			}
		}
		private void BtnOK_Click(object sender, EventArgs e)
		{
			if (this.ValidateColumns())
			{
				gf.Import_TableName = "[" + this.TablesList.Text + "]";
				gf.Import_SongTitleColumnName = "[" + this.AssignedTitle.Text + "]";
				for (int i = 0; i <= this.AssignedLyricsMergeOrderList.Items.Count - 1; i++)
				{
					object import_SongLyricsColumnName = gf.Import_SongLyricsColumnName;
					gf.Import_SongLyricsColumnName = string.Concat(new object[]
					{
						import_SongLyricsColumnName,
						"[",
						this.AssignedLyricsMergeOrderList.Items[i].Text,
						"]",
						'>'
					});
				}
				string text = "";
				gf.Import_SongTitle2ColumnName = ((this.AssignedTitle2.Text != "") ? ("[" + this.AssignedTitle2.Text + "]") : text);
				gf.Import_SongNumberColumnName = ((this.AssignedSongNumber.Text != "") ? ("[" + this.AssignedSongNumber.Text + "]") : text);
				gf.Import_SongWriterInfoColumnName = ((this.AssignedWriter.Text != "") ? ("[" + this.AssignedWriter.Text + "]") : text);
				gf.Import_BookReferenceColumnName = ((this.AssignedBookReference.Text != "") ? ("[" + this.AssignedBookReference.Text + "]") : text);
				gf.Import_UserReferenceColumnName = ((this.AssignedUserReference.Text != "") ? ("[" + this.AssignedUserReference.Text + "]") : text);
				gf.Import_SongCopyrightColumnName = ((this.AssignedCopyright.Text != "") ? ("[" + this.AssignedCopyright.Text + "]") : text);
				gf.Import_SongKeyColumnName = ((this.AssignedKey.Text != "") ? ("[" + this.AssignedKey.Text + "]") : text);
				gf.Import_SongTimingColumnName = ((this.AssignedTiming.Text != "") ? ("[" + this.AssignedTiming.Text + "]") : text);
				gf.Import_Admin1ColumnName = ((this.AssignedAdmin1.Text != "") ? ("[" + this.AssignedAdmin1.Text + "]") : text);
				gf.Import_Admin2ColumnName = ((this.AssignedAdmin2.Text != "") ? ("[" + this.AssignedAdmin2.Text + "]") : text);
				base.DialogResult = DialogResult.OK;
				base.Close();
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.TablesList = new System.Windows.Forms.ComboBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.TableExtracts = new System.Windows.Forms.ListView();
            this.label3 = new System.Windows.Forms.Label();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.panelVerses = new System.Windows.Forms.Panel();
            this.AssignedLyrics = new System.Windows.Forms.ListView();
            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.panel2 = new System.Windows.Forms.Panel();
            this.label16 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.panelOrderList = new System.Windows.Forms.Panel();
            this.AssignedLyricsMergeOrderList = new System.Windows.Forms.ListView();
            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.panel4 = new System.Windows.Forms.Panel();
            this.label17 = new System.Windows.Forms.Label();
            this.AssignedTitle = new System.Windows.Forms.ComboBox();
            this.panelSeqSet = new System.Windows.Forms.Panel();
            this.toolStripColumnAdd = new System.Windows.Forms.ToolStrip();
            this.Column_Add = new System.Windows.Forms.ToolStripButton();
            this.panelSeqUpDown = new System.Windows.Forms.Panel();
            this.toolStripSeqUpDown = new System.Windows.Forms.ToolStrip();
            this.OrderList_Up = new System.Windows.Forms.ToolStripButton();
            this.OrderList_Down = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
            this.OrderList_Delete = new System.Windows.Forms.ToolStripButton();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.AssignedAdmin2 = new System.Windows.Forms.ComboBox();
            this.AssignedAdmin1 = new System.Windows.Forms.ComboBox();
            this.AssignedTiming = new System.Windows.Forms.ComboBox();
            this.AssignedWriter = new System.Windows.Forms.ComboBox();
            this.AssignedKey = new System.Windows.Forms.ComboBox();
            this.AssignedCopyright = new System.Windows.Forms.ComboBox();
            this.AssignedUserReference = new System.Windows.Forms.ComboBox();
            this.AssignedSongNumber = new System.Windows.Forms.ComboBox();
            this.AssignedBookReference = new System.Windows.Forms.ComboBox();
            this.AssignedTitle2 = new System.Windows.Forms.ComboBox();
            this.label15 = new System.Windows.Forms.Label();
            this.label13 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.label9 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label14 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.label10 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.BtnCancel = new System.Windows.Forms.Button();
            this.BtnOK = new System.Windows.Forms.Button();
            this.groupBox2.SuspendLayout();
            this.panelVerses.SuspendLayout();
            this.panel2.SuspendLayout();
            this.panelOrderList.SuspendLayout();
            this.panel4.SuspendLayout();
            this.panelSeqSet.SuspendLayout();
            this.toolStripColumnAdd.SuspendLayout();
            this.panelSeqUpDown.SuspendLayout();
            this.toolStripSeqUpDown.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            // 
            // TablesList
            // 
            this.TablesList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.TablesList.FormattingEnabled = true;
            this.TablesList.Location = new System.Drawing.Point(13, 25);
            this.TablesList.MaxDropDownItems = 12;
            this.TablesList.Name = "TablesList";
            this.TablesList.Size = new System.Drawing.Size(248, 21);
            this.TablesList.TabIndex = 0;
            this.TablesList.SelectedIndexChanged += new System.EventHandler(this.TablesList_SelectedIndexChanged);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(262, 13);
            this.label1.TabIndex = 4;
            this.label1.Text = "Step 1. Select the table which holds the songs details:";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(267, 28);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(163, 13);
            this.label2.TabIndex = 5;
            this.label2.Text = "Records Found in selected table:";
            // 
            // TableExtracts
            // 
            this.TableExtracts.FullRowSelect = true;
            this.TableExtracts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
            this.TableExtracts.HideSelection = false;
            this.TableExtracts.LabelWrap = false;
            this.TableExtracts.Location = new System.Drawing.Point(12, 52);
            this.TableExtracts.Name = "TableExtracts";
            this.TableExtracts.ShowItemToolTips = true;
            this.TableExtracts.Size = new System.Drawing.Size(633, 137);
            this.TableExtracts.TabIndex = 1;
            this.TableExtracts.UseCompatibleStateImageBehavior = false;
            this.TableExtracts.View = System.Windows.Forms.View.Details;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(12, 194);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(234, 13);
            this.label3.TabIndex = 2;
            this.label3.Text = "Step 2. Assign compulsory and optional columns";
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.panelVerses);
            this.groupBox2.Controls.Add(this.label4);
            this.groupBox2.Controls.Add(this.panelOrderList);
            this.groupBox2.Controls.Add(this.AssignedTitle);
            this.groupBox2.Controls.Add(this.panelSeqSet);
            this.groupBox2.Controls.Add(this.panelSeqUpDown);
            this.groupBox2.Location = new System.Drawing.Point(12, 210);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Padding = new System.Windows.Forms.Padding(0);
            this.groupBox2.Size = new System.Drawing.Size(274, 164);
            this.groupBox2.TabIndex = 3;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Mandatory Columns";
            // 
            // panelVerses
            // 
            this.panelVerses.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panelVerses.Controls.Add(this.AssignedLyrics);
            this.panelVerses.Controls.Add(this.panel2);
            this.panelVerses.Location = new System.Drawing.Point(6, 42);
            this.panelVerses.Name = "panelVerses";
            this.panelVerses.Size = new System.Drawing.Size(105, 114);
            this.panelVerses.TabIndex = 1;
            // 
            // AssignedLyrics
            // 
            this.AssignedLyrics.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeader1});
            this.AssignedLyrics.Dock = System.Windows.Forms.DockStyle.Fill;
            this.AssignedLyrics.FullRowSelect = true;
            this.AssignedLyrics.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
            this.AssignedLyrics.Location = new System.Drawing.Point(0, 14);
            this.AssignedLyrics.Margin = new System.Windows.Forms.Padding(1);
            this.AssignedLyrics.Name = "AssignedLyrics";
            this.AssignedLyrics.ShowItemToolTips = true;
            this.AssignedLyrics.Size = new System.Drawing.Size(101, 96);
            this.AssignedLyrics.TabIndex = 0;
            this.AssignedLyrics.UseCompatibleStateImageBehavior = false;
            this.AssignedLyrics.View = System.Windows.Forms.View.Details;
            this.AssignedLyrics.DoubleClick += new System.EventHandler(this.AssignedLyrics_DoubleClick);
            // 
            // columnHeader1
            // 
            this.columnHeader1.Width = 74;
            // 
            // panel2
            // 
            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel2.Controls.Add(this.label16);
            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel2.Location = new System.Drawing.Point(0, 0);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(101, 14);
            this.panel2.TabIndex = 0;
            // 
            // label16
            // 
            this.label16.AutoSize = true;
            this.label16.Location = new System.Drawing.Point(3, -1);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(37, 13);
            this.label16.TabIndex = 0;
            this.label16.Text = "Lyrics:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(7, 19);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(30, 13);
            this.label4.TabIndex = 61;
            this.label4.Text = "Title:";
            // 
            // panelOrderList
            // 
            this.panelOrderList.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panelOrderList.Controls.Add(this.AssignedLyricsMergeOrderList);
            this.panelOrderList.Controls.Add(this.panel4);
            this.panelOrderList.Location = new System.Drawing.Point(140, 42);
            this.panelOrderList.Name = "panelOrderList";
            this.panelOrderList.Size = new System.Drawing.Size(107, 114);
            this.panelOrderList.TabIndex = 2;
            // 
            // AssignedLyricsMergeOrderList
            // 
            this.AssignedLyricsMergeOrderList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeader6});
            this.AssignedLyricsMergeOrderList.Dock = System.Windows.Forms.DockStyle.Fill;
            this.AssignedLyricsMergeOrderList.FullRowSelect = true;
            this.AssignedLyricsMergeOrderList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
            this.AssignedLyricsMergeOrderList.Location = new System.Drawing.Point(0, 14);
            this.AssignedLyricsMergeOrderList.Name = "AssignedLyricsMergeOrderList";
            this.AssignedLyricsMergeOrderList.ShowItemToolTips = true;
            this.AssignedLyricsMergeOrderList.Size = new System.Drawing.Size(103, 96);
            this.AssignedLyricsMergeOrderList.TabIndex = 0;
            this.AssignedLyricsMergeOrderList.UseCompatibleStateImageBehavior = false;
            this.AssignedLyricsMergeOrderList.View = System.Windows.Forms.View.Details;
            // 
            // columnHeader6
            // 
            this.columnHeader6.Width = 74;
            // 
            // panel4
            // 
            this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel4.Controls.Add(this.label17);
            this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel4.Location = new System.Drawing.Point(0, 0);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(103, 14);
            this.panel4.TabIndex = 0;
            // 
            // label17
            // 
            this.label17.AutoSize = true;
            this.label17.Location = new System.Drawing.Point(3, -1);
            this.label17.Name = "label17";
            this.label17.Size = new System.Drawing.Size(89, 13);
            this.label17.TabIndex = 0;
            this.label17.Text = "Lyrics Merge List:";
            // 
            // AssignedTitle
            // 
            this.AssignedTitle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedTitle.FormattingEnabled = true;
            this.AssignedTitle.Location = new System.Drawing.Point(37, 16);
            this.AssignedTitle.MaxDropDownItems = 12;
            this.AssignedTitle.Name = "AssignedTitle";
            this.AssignedTitle.Size = new System.Drawing.Size(117, 21);
            this.AssignedTitle.TabIndex = 0;
            // 
            // panelSeqSet
            // 
            this.panelSeqSet.Controls.Add(this.toolStripColumnAdd);
            this.panelSeqSet.Location = new System.Drawing.Point(111, 58);
            this.panelSeqSet.Name = "panelSeqSet";
            this.panelSeqSet.Size = new System.Drawing.Size(25, 27);
            this.panelSeqSet.TabIndex = 13;
            // 
            // toolStripColumnAdd
            // 
            this.toolStripColumnAdd.AutoSize = false;
            this.toolStripColumnAdd.CanOverflow = false;
            this.toolStripColumnAdd.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripColumnAdd.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripColumnAdd.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.Column_Add});
            this.toolStripColumnAdd.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow;
            this.toolStripColumnAdd.Location = new System.Drawing.Point(0, 1);
            this.toolStripColumnAdd.Name = "toolStripColumnAdd";
            this.toolStripColumnAdd.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripColumnAdd.Size = new System.Drawing.Size(25, 35);
            this.toolStripColumnAdd.TabIndex = 5;
            // 
            // Column_Add
            // 
            this.Column_Add.AutoSize = false;
            this.Column_Add.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.Column_Add.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.Column_Add.Name = "Column_Add";
            this.Column_Add.Size = new System.Drawing.Size(22, 22);
            this.Column_Add.Tag = "";
            this.Column_Add.ToolTipText = "Add";
            this.Column_Add.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Column_MouseUp);
            // 
            // panelSeqUpDown
            // 
            this.panelSeqUpDown.Controls.Add(this.toolStripSeqUpDown);
            this.panelSeqUpDown.Location = new System.Drawing.Point(247, 58);
            this.panelSeqUpDown.Name = "panelSeqUpDown";
            this.panelSeqUpDown.Size = new System.Drawing.Size(25, 79);
            this.panelSeqUpDown.TabIndex = 12;
            // 
            // toolStripSeqUpDown
            // 
            this.toolStripSeqUpDown.AutoSize = false;
            this.toolStripSeqUpDown.CanOverflow = false;
            this.toolStripSeqUpDown.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripSeqUpDown.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripSeqUpDown.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.OrderList_Up,
            this.OrderList_Down,
            this.toolStripSeparator5,
            this.OrderList_Delete});
            this.toolStripSeqUpDown.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow;
            this.toolStripSeqUpDown.Location = new System.Drawing.Point(0, 1);
            this.toolStripSeqUpDown.Name = "toolStripSeqUpDown";
            this.toolStripSeqUpDown.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripSeqUpDown.Size = new System.Drawing.Size(25, 89);
            this.toolStripSeqUpDown.TabIndex = 0;
            // 
            // OrderList_Up
            // 
            this.OrderList_Up.AutoSize = false;
            this.OrderList_Up.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.OrderList_Up.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.OrderList_Up.Name = "OrderList_Up";
            this.OrderList_Up.Size = new System.Drawing.Size(22, 22);
            this.OrderList_Up.Tag = "up";
            this.OrderList_Up.ToolTipText = "Move Item Up";
            this.OrderList_Up.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OrderList_MouseUp);
            // 
            // OrderList_Down
            // 
            this.OrderList_Down.AutoSize = false;
            this.OrderList_Down.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.OrderList_Down.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.OrderList_Down.Name = "OrderList_Down";
            this.OrderList_Down.Size = new System.Drawing.Size(22, 22);
            this.OrderList_Down.Tag = "down";
            this.OrderList_Down.ToolTipText = "Move Item Down";
            this.OrderList_Down.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OrderList_MouseUp);
            // 
            // toolStripSeparator5
            // 
            this.toolStripSeparator5.Name = "toolStripSeparator5";
            this.toolStripSeparator5.Size = new System.Drawing.Size(23, 6);
            // 
            // OrderList_Delete
            // 
            this.OrderList_Delete.AutoSize = false;
            this.OrderList_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.OrderList_Delete.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.OrderList_Delete.Name = "OrderList_Delete";
            this.OrderList_Delete.Size = new System.Drawing.Size(22, 22);
            this.OrderList_Delete.Tag = "delete";
            this.OrderList_Delete.ToolTipText = "Delete";
            this.OrderList_Delete.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OrderList_MouseUp);
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.AssignedAdmin2);
            this.groupBox1.Controls.Add(this.AssignedAdmin1);
            this.groupBox1.Controls.Add(this.AssignedTiming);
            this.groupBox1.Controls.Add(this.AssignedWriter);
            this.groupBox1.Controls.Add(this.AssignedKey);
            this.groupBox1.Controls.Add(this.AssignedCopyright);
            this.groupBox1.Controls.Add(this.AssignedUserReference);
            this.groupBox1.Controls.Add(this.AssignedSongNumber);
            this.groupBox1.Controls.Add(this.AssignedBookReference);
            this.groupBox1.Controls.Add(this.AssignedTitle2);
            this.groupBox1.Controls.Add(this.label15);
            this.groupBox1.Controls.Add(this.label13);
            this.groupBox1.Controls.Add(this.label11);
            this.groupBox1.Controls.Add(this.label9);
            this.groupBox1.Controls.Add(this.label6);
            this.groupBox1.Controls.Add(this.label14);
            this.groupBox1.Controls.Add(this.label12);
            this.groupBox1.Controls.Add(this.label10);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.label7);
            this.groupBox1.Location = new System.Drawing.Point(292, 211);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(353, 163);
            this.groupBox1.TabIndex = 4;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Optional Columns";
            // 
            // AssignedAdmin2
            // 
            this.AssignedAdmin2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedAdmin2.FormattingEnabled = true;
            this.AssignedAdmin2.Location = new System.Drawing.Point(228, 131);
            this.AssignedAdmin2.MaxDropDownItems = 12;
            this.AssignedAdmin2.Name = "AssignedAdmin2";
            this.AssignedAdmin2.Size = new System.Drawing.Size(117, 21);
            this.AssignedAdmin2.TabIndex = 19;
            // 
            // AssignedAdmin1
            // 
            this.AssignedAdmin1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedAdmin1.FormattingEnabled = true;
            this.AssignedAdmin1.Location = new System.Drawing.Point(55, 131);
            this.AssignedAdmin1.MaxDropDownItems = 12;
            this.AssignedAdmin1.Name = "AssignedAdmin1";
            this.AssignedAdmin1.Size = new System.Drawing.Size(117, 21);
            this.AssignedAdmin1.TabIndex = 9;
            // 
            // AssignedTiming
            // 
            this.AssignedTiming.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedTiming.FormattingEnabled = true;
            this.AssignedTiming.Location = new System.Drawing.Point(228, 104);
            this.AssignedTiming.MaxDropDownItems = 12;
            this.AssignedTiming.Name = "AssignedTiming";
            this.AssignedTiming.Size = new System.Drawing.Size(117, 21);
            this.AssignedTiming.TabIndex = 17;
            // 
            // AssignedWriter
            // 
            this.AssignedWriter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedWriter.FormattingEnabled = true;
            this.AssignedWriter.Location = new System.Drawing.Point(55, 104);
            this.AssignedWriter.MaxDropDownItems = 12;
            this.AssignedWriter.Name = "AssignedWriter";
            this.AssignedWriter.Size = new System.Drawing.Size(117, 21);
            this.AssignedWriter.TabIndex = 7;
            // 
            // AssignedKey
            // 
            this.AssignedKey.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedKey.FormattingEnabled = true;
            this.AssignedKey.Location = new System.Drawing.Point(228, 77);
            this.AssignedKey.MaxDropDownItems = 12;
            this.AssignedKey.Name = "AssignedKey";
            this.AssignedKey.Size = new System.Drawing.Size(117, 21);
            this.AssignedKey.TabIndex = 15;
            // 
            // AssignedCopyright
            // 
            this.AssignedCopyright.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedCopyright.FormattingEnabled = true;
            this.AssignedCopyright.Location = new System.Drawing.Point(55, 77);
            this.AssignedCopyright.MaxDropDownItems = 12;
            this.AssignedCopyright.Name = "AssignedCopyright";
            this.AssignedCopyright.Size = new System.Drawing.Size(117, 21);
            this.AssignedCopyright.TabIndex = 5;
            // 
            // AssignedUserReference
            // 
            this.AssignedUserReference.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedUserReference.FormattingEnabled = true;
            this.AssignedUserReference.Location = new System.Drawing.Point(228, 50);
            this.AssignedUserReference.MaxDropDownItems = 12;
            this.AssignedUserReference.Name = "AssignedUserReference";
            this.AssignedUserReference.Size = new System.Drawing.Size(117, 21);
            this.AssignedUserReference.TabIndex = 13;
            // 
            // AssignedSongNumber
            // 
            this.AssignedSongNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedSongNumber.FormattingEnabled = true;
            this.AssignedSongNumber.Location = new System.Drawing.Point(55, 50);
            this.AssignedSongNumber.MaxDropDownItems = 12;
            this.AssignedSongNumber.Name = "AssignedSongNumber";
            this.AssignedSongNumber.Size = new System.Drawing.Size(117, 21);
            this.AssignedSongNumber.TabIndex = 3;
            // 
            // AssignedBookReference
            // 
            this.AssignedBookReference.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedBookReference.FormattingEnabled = true;
            this.AssignedBookReference.Location = new System.Drawing.Point(228, 23);
            this.AssignedBookReference.MaxDropDownItems = 12;
            this.AssignedBookReference.Name = "AssignedBookReference";
            this.AssignedBookReference.Size = new System.Drawing.Size(117, 21);
            this.AssignedBookReference.TabIndex = 11;
            // 
            // AssignedTitle2
            // 
            this.AssignedTitle2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.AssignedTitle2.FormattingEnabled = true;
            this.AssignedTitle2.Location = new System.Drawing.Point(55, 23);
            this.AssignedTitle2.MaxDropDownItems = 12;
            this.AssignedTitle2.Name = "AssignedTitle2";
            this.AssignedTitle2.Size = new System.Drawing.Size(117, 21);
            this.AssignedTitle2.TabIndex = 1;
            // 
            // label15
            // 
            this.label15.AutoSize = true;
            this.label15.Location = new System.Drawing.Point(5, 134);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(45, 13);
            this.label15.TabIndex = 8;
            this.label15.Text = "Admin 1";
            // 
            // label13
            // 
            this.label13.AutoSize = true;
            this.label13.Location = new System.Drawing.Point(5, 107);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(38, 13);
            this.label13.TabIndex = 6;
            this.label13.Text = "Writer:";
            // 
            // label11
            // 
            this.label11.AutoSize = true;
            this.label11.Location = new System.Drawing.Point(5, 80);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(54, 13);
            this.label11.TabIndex = 4;
            this.label11.Text = "Copyright:";
            // 
            // label9
            // 
            this.label9.AutoSize = true;
            this.label9.Location = new System.Drawing.Point(5, 53);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(52, 13);
            this.label9.TabIndex = 2;
            this.label9.Text = "Song No.";
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(5, 26);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(39, 13);
            this.label6.TabIndex = 0;
            this.label6.Text = "Title 2:";
            // 
            // label14
            // 
            this.label14.AutoSize = true;
            this.label14.Location = new System.Drawing.Point(175, 134);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(48, 13);
            this.label14.TabIndex = 18;
            this.label14.Text = "Admin 2:";
            // 
            // label12
            // 
            this.label12.AutoSize = true;
            this.label12.Location = new System.Drawing.Point(175, 107);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(41, 13);
            this.label12.TabIndex = 16;
            this.label12.Text = "Timing:";
            // 
            // label10
            // 
            this.label10.AutoSize = true;
            this.label10.Location = new System.Drawing.Point(175, 80);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(55, 13);
            this.label10.TabIndex = 14;
            this.label10.Text = "Song key:";
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(175, 53);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(52, 13);
            this.label8.TabIndex = 12;
            this.label8.Text = "User Ref:";
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(175, 26);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(55, 13);
            this.label7.TabIndex = 10;
            this.label7.Text = "Book Ref:";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(12, 380);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(120, 13);
            this.label5.TabIndex = 59;
            this.label5.Text = "Step 3. Click Import >>>";
            // 
            // BtnCancel
            // 
            this.BtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.BtnCancel.Location = new System.Drawing.Point(566, 380);
            this.BtnCancel.Name = "BtnCancel";
            this.BtnCancel.Size = new System.Drawing.Size(80, 24);
            this.BtnCancel.TabIndex = 6;
            this.BtnCancel.Text = "Cancel";
            this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
            // 
            // BtnOK
            // 
            this.BtnOK.Location = new System.Drawing.Point(470, 380);
            this.BtnOK.Name = "BtnOK";
            this.BtnOK.Size = new System.Drawing.Size(80, 24);
            this.BtnOK.TabIndex = 5;
            this.BtnOK.Text = "Import";
            this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
            // 
            // FrmImportAccessHelper
            // 
            this.AcceptButton = this.BtnOK;
            this.CancelButton = this.BtnCancel;
            this.ClientSize = new System.Drawing.Size(658, 424);
            this.Controls.Add(this.BtnCancel);
            this.Controls.Add(this.BtnOK);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.TableExtracts);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.TablesList);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FrmImportAccessHelper";
            this.ShowIcon = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Access Helper";
            this.Load += new System.EventHandler(this.FrmImportAccessHelper_Load);
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.panelVerses.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.panelOrderList.ResumeLayout(false);
            this.panel4.ResumeLayout(false);
            this.panel4.PerformLayout();
            this.panelSeqSet.ResumeLayout(false);
            this.toolStripColumnAdd.ResumeLayout(false);
            this.toolStripColumnAdd.PerformLayout();
            this.panelSeqUpDown.ResumeLayout(false);
            this.toolStripSeqUpDown.ResumeLayout(false);
            this.toolStripSeqUpDown.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

		}

        private void BtnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }
	}
}
